package com.ygf.config;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * <p>
 * description:
 * </p>
 *
 * @author yangguanfeng
 * @since 2021/4/25 17:40
 */
@Aspect
@Component
public class AspectTest {

	@Pointcut("execution(* com.ygf.service.*.*(..))")
	public void pointCut() {

	}

	@Around("pointCut()")
	public Object exec(ProceedingJoinPoint point) throws Throwable {
		System.out.println("------before-----------");
		Object o = point.proceed();
		System.out.println("------after-----------");

		return o;
	}


}
